<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div th:fragment="agentListPage">
		<div class="bar bar-header-secondary">
			<div class="searchbar row">
	   			<div class="search-input col-75">
	     			<input type="search" v-model="mobileNo" placeholder='输入手机号码……'/>
	   			</div>
	   			<a class="button button-fill button-primary col-25" @click="searchAgent" style="top: 0;">搜索</a>
	 		</div>
	  	</div>
		<div class="content infinite-scroll" style="top: 4.5rem; bottom: 3rem;">
			<div class="card" v-for="agent in agents">
				<div class="card-content">
					<div class="list-block media-list">
						<ul>
							<li class="item-content item-link" @click="showDetail(agent)">
								<div class="item-media">
									<img :src="agent.headUrl" style='width: 3rem;height: 3rem;'>
								</div>
								<div class="item-inner">
									<div class="item-title-row">
										<div class="item-title">{{agent.name}}</div>
									</div>
									<div class="item-subtitle">{{agent.level_fmt}}</div>
									<div class="item-text" style="height: 1.05rem;">{{agent.mobileNo}}</div>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<div class="card-footer">
					<span>申请时间：{{agent.joinTime_fmt}}</span>
					<span><a href="javascript:void(0);" class="button button-success" @click="audit(agent)">审核</a></span>
				</div>
			</div>
			<div v-if="agents.length == 0" class="content-block-title text-center">目前没有需要审核的代理</div>
			<div v-if="totalPage > 1" class="infinite-scroll-preloader">
	        	<div class="preloader"></div>
	        </div>
		</div>
	</div>
	<div th:fragment="agentDetailPage" class="content">
		<div class="list-block">
	    	<ul>
	      		<li class="item-content" v-for="agentTitle in agentTitles">
					<div class="item-inner" v-for="(title,field) in agentTitle">
						<div class="item-title">{{title}}</div>
						<div class="item-after">{{agent[field]}}</div>
					</div>
				</li>
	    	</ul>
	  	</div>
	</div>
</body>
</html>